<?php
//Boot scenario

//Choose scenario from available
$filename = 'system/conf/boot/';
if(isset($_GET['boot_scn']) and file_exists($filename.$_GET['boot_scn'].'.ini')) $filename .= $_GET['boot_scn'].'.ini';
else $filename .= 'normal.ini';

//Load scenario
$scn = file($filename);
foreach($scn as $index=>$value) if(substr($value,0,1)=='#') unset($scn[$index]);
$buffer = implode('', $scn);
$buffer = str_replace(array("\r","\n"," ","\t"),'',$buffer);
if(substr($buffer,strlen($buffer)-1,1)==';') $buffer = substr($buffer,0,strlen($buffer)-1);
unset($scn);

//Form arrays
$tags_accepted = array('options', 'preload', 'postload', 'load');
foreach($tags_accepted as $value) {
	unset($match);
	$pattern = "/<$value>(.*)<\/$value>/";
	if(preg_match($pattern, $buffer, $match)) {
		$$value = $match[1];
	}
}

//Load core
//include_once('core.php');

//Select boot scenario

//Execute boot scenario
?> 
